//
//  PreferencesData.h
//

#import <Cocoa/Cocoa.h>

#define STARTUP_WIN_BROWSER		0
#define STARTUP_WIN_VIEWER		1

#define STARTUP_FOLDER_LAST		0
#define STARTUP_FOLDER_SPECIFIC	1


@interface PreferencesData : NSObject 
{
	// General preferences
	BOOL		confirmMoveToTrash;
	BOOL		useAppleRemote;
	int			startupWindowType;
	int			startupFolderType;
	NSString	*startupFolder;
	NSString	*lastFolder;


	// Browser preferences
	BOOL		regenerateThumbnails;
	BOOL		markGeneratedThumbnails;
	BOOL		showHiddenFolders;
	NSColor		*browserBackgroundColor;	// nil is default
	NSColor		*browserTextColor;			// nil is default


	// Viewer preferences
	BOOL		useSingleWindow;
	BOOL		useMovieNaturalSize;
	int			pageJump;
	int			thumbStripState;
	int			pathElements;
	NSColor		*viewerBackgroundColor;		// nil is default
	NSColor		*viewerTextColor;			// nil is default


	// Slideshow preferences
	int			slideshowDelay;
	int			slideshowOrder;
	NSColor		*slideshowBackgroundColor;
	NSColor		*slideshowTextColor;
	NSString	*slideshowFolder;
}

- (id) initWithDefaults: (NSUserDefaults *)defaults;
- (void) writeToDefaults: (NSUserDefaults*) defaults;


// General
- (BOOL) confirmMoveToTrash;
- (BOOL) useAppleRemote;
- (int) startupWindowType;
- (int) startupFolderType;
- (NSString*) startupFolder;
- (NSString*) lastFolder;

- (void) setConfirmMoveToTrash:(BOOL) confirm;
- (void) setUseAppleRemote:(BOOL) use;
- (void) setStartupWindowType:(int) windowType;
- (void) setStartupFolderType:(int) folderType;
- (void) setStartupFolder:(NSString*) folder;
- (void) setLastFolder:(NSString *) folder;


// Browser
- (BOOL) regenerateMismatchedThumbs;
- (BOOL) markGeneratedThumbnails;
- (BOOL) showHiddenFolders;
- (NSColor*) browserBackgroundColor;
- (NSColor*) browserTextColor;

- (void) setRegenerateMismatchedThumbs:(BOOL) regenerate;
- (void) setMarkGeneratedThumbnails:(BOOL) mark;
- (void) setShowHiddenFolders:(BOOL) show;
- (void) setBrowserBackgroundColor:(NSColor*) color;
- (void) setBrowserTextColor:(NSColor*) color;


// Viewer
- (int) pageJumpSize;
- (BOOL) useSingleWindow;
- (BOOL) useMovieNaturalSize;
- (int) thumbStripState;
- (NSColor*) viewerBackgroundColor;
- (NSColor*) viewerTextColor;
- (int) pathElements;

- (void) setPageJumpSize:(int) size;
- (void) setPathElements:(int) count;
- (void) setThumbStripState:(int) state;
- (void) setViewerBackgroundColor:(NSColor*) color;
- (void) setViewerTextColor:(NSColor*) color;
- (void) setUseSingleWindow:(BOOL) single;
- (void) setUseMovieNaturalSize:(BOOL) naturalSize;


// Slideshow
- (int) slideshowDelay;
- (int) slideshowOrder;
- (NSColor*) slideshowBackgroundColor;
- (NSColor*) slideshowTextColor;
- (NSString*) slideshowFolder;

- (void) setSlideshowDelay:(int) delay;
- (void) setSlideshowOrder:(int) order;
- (void) setSlideshowBackgroundColor:(NSColor*) color;
- (void) setSlideshowTextColor:(NSColor*) color;
- (void) setSlideshowFolder:(NSString*) folder;

@end

// Notification - sent when the preferences are updated
extern NSString *PBPrefencesDidChangeNotification;
